<?php
/**
 * check login
 */
if(isset($_SESSION['login'])){
        $return['login'] = $_SESSION['login'];
        $return['id'] = $_SESSION['id'];
}else{
        $return['login'] = false;
}
echo json_encode($return);
?>